<?php

require_once('startsession.php');
require_once('getDBConnection.php');
require_once('Constants.php');
require_once('Profile.php');

  // Insert the page header
  $page_title = 'Welcome to the Points Counter Webapp home page';
  require_once('header.php');



  // Show the navigation menu
  require_once('navmenu.php');

if (isset($_SESSION['profile'])) {
	  $profile= unserialize($_SESSION['profile']);
  }
  else {
	  $profile= new Profile();
  }


if(isset($_SESSION['userid']) && $_SESSION['userid'] == $profile->userId){
	echo'<br/>';
?>

<object>
<param name="tracker" value="WeightWatchersPointsTracker.swf">
<embed src="bin-release/WeightWatchersPointsTracker.swf" width="1024" height="768">
</embed>
</object>


<?php
}

  // Insert the page footer
  require_once('footer.php');
?>
